export const culomnSpan = () => {
    let width = window.screen.width
    var culomnSpan = ''
    if (width <= 1024) {
        culomnSpan = 24
    } else if (width > 1024 && width < 1440) {
        culomnSpan = 12
    } else if (width >= 1440 && width < 1920){
        culomnSpan = 8
    }else{
        culomnSpan = 6
    }
    return culomnSpan
}

export const searchSpan = (num) => {
    var n = num % 3
    var h = num % 2
    var x = num % 4
    let width = window.screen.width
    var searchSpan = ''
    if (width <= 1024) {
        searchSpan = 24
    } else if (width > 1024 && width < 1440) {
        if (h == 0) {
            searchSpan = 24
        } else if (h == 1) {
            searchSpan = 12
        }
    } else if (width >= 1440 && width < 1920) {
        if (n == 0) {
            searchSpan = 24
        } else if (n == 1) {
            searchSpan = 16
        } else if (n == 2) {
            searchSpan = 8
        }
    }else{
        if(x == 0){
            searchSpan = 24
        } else if (x == 1) {
            searchSpan = 18
        } else if (x == 2) {
            searchSpan = 12
        }else if(x == 3){
            searchSpan = 6
        }
    }
    return searchSpan
}